//鼠标经过显示区域(tips)效果
(function($){
	$.fn.extend({
		tips:function(){
			var tip = $('#tip'),time;
			return this.each(function(){
				$(this).mouseover(function(){
					clearTimeout(time);
					var $this = $(this);
					var title=$this.attr("title");
					this.title="";
					var pic = null;
					if(this.tagName.toLowerCase()=="img"){
						var pic = $this.attr("midpath")||$this.attr("path");
						if(/\{.*}/.test(pic)){
							pic = null;
						}
					}
					if(title)tip.find("span[name=title]").html(title);
					if(pic)tip.find("img[name=pic]").attr("src",pic).show();
					tip.show('fast');
				}).mouseout(function(){
					tip.find("img[name=pic]").hide();
					tip.hide();
					time=setTimeout(function(){tip.hide();clearTimeout(time)},1000);
				}).mousemove(function(e){
					tip.css({"top":(e.pageY)+"px","left":(e.pageX+15)+"px"})
				})
			})
		}
	})
})(jQuery);